<template>
  <div class="main">
    <div class="person">
      <div class="top_box">
        <div class="info">
          <p class="myhead">
            <img :src="msg.avatar" alt />
          </p>
          <p class="mycon">{{msg.nickname}}</p>
          <p class="icon" @click="goMsg">
            <Icon name="edit" />
          </p>
          <p class="abc" @click="onYueKe">去约课</p>
        </div>
        <div class="inmsg">
          <div class="tese" @click="goMyStudy">
            <p class="num">{{msg.is_buy}}</p>
            <p class="text">我的特色课</p>
            <p class="stu">已购特色课程的学习</p>
          </div>
          <div class="fudao" @click="onYueKe">
            <p class="num">0</p>
            <p class="text">一对一辅导</p>
            <p class="stu">我的一对一老师辅导</p>
          </div>
          <div class="money">
            <p class="num">0.00</p>
            <p class="text">剩余学习币</p>
            <p class="stu">查看剩余学习币</p>
          </div>
        </div>
      </div>
    </div>
    <div class="mid">
      <div class="one">
        <Icon name="gift-card-o" />
      </div>
      <div class="two">
        <p>邀请好友注册APP，享多重好礼</p>
        <p>限时特惠，多邀多得</p>
      </div>
      <div class="three">
        <Icon name="arrow" />
      </div>
    </div>
    <ul class="list">
      <li>
        <p>课程相关</p>
        <div>
          <div @click="goLikeTeaccher">
            <img
              src=""
              alt
            />
            <p>关注的老师</p>
          </div>
          <div @click="goLike">
            <img
              src=""
              alt
            />
            <p>我的收藏</p>
          </div>
        </div>
      </li>
      <li>
        <p>订单相关</p>
        <div>
          <div @click="gotext">
            <img
              src=""
              alt
            />
            <p>课程订单</p>
          </div>
          <div @click="govip">
            <img
              src=""
              alt
            />
            <p>会员订单</p>
          </div>
          <div @click="goyue">
            <img
              src=""
              alt
            />
            <p>约课订单</p>
          </div>
        </div>
      </li>
      <li>
        <p>我的账户</p>
        <div>
          <div>
            <img
              src=""
              alt
            />
            <p>优惠卡</p>
          </div>
          <div>
            <img
              src=""
              alt
            />
            <p>学习卡</p>
          </div>
          <div>
            <img
              src=""
              alt
            />
            <p>会员</p>
          </div>
        </div>
      </li>
      <li>
        <p>自助服务</p>
        <div>
          <div>
            <img
              src=""
              alt
            />
            <p>我的消息</p>
          </div>
          <div>
            <img
              src=""
              alt
            />
            <p>意见反馈</p>
          </div>
          <div>
            <img
              src=""
              alt
            />
            <p>在线客服</p>
          </div>
          <div>
            <img
              src=""
              alt
            />
            <p>设置</p>
          </div>
        </div>
      </li>
    </ul>
    <Drag></Drag>
  </div>
</template>

<script>
import Drag from "../../components/Drag";
import { Icon } from "vant";
export default {
  components: {
    Drag,
    Icon,
  },
  data() {
    return {
      msg: {},
    };
  },
  mounted() {
    let a = localStorage.getItem("obj");
    var obj = JSON.parse(a);
    console.log(obj);
    this.msg = obj;
  },
  methods: {
    goMsg() {
      this.$router.push("/mymsg");
    },
    gotext() {
      this.$router.push({
        path: "/textdd",
      });
    },
    govip() {
      this.$router.push({
        path: "/textvip",
      });
    },
    goyue() {
      this.$router.push({
        path: "/textyue",
      });
    },
    goLike() {
      this.$router.push({
        path: "/mylike",
      });
    },
    goLikeTeaccher() {
      this.$router.push({
        path: "/myteacher",
      });
    },
    onYueKe() {
      this.$router.push({
        path: "/yueke",
      });
    },
    goMyStudy() {
      this.$router.push({
        path: "/mystudy",
      });
    },
  },
};
</script>

<style scoped>
.main {
  /* background-color: #eee; */
  padding-bottom: 100px;
}
.person {
  width: 90%;
  height: 180px;
  padding-top: 20px;
  margin: 0 auto;
}
.top_box {
  width: 100%;
  height: 180px;
  background-color: #ffffff;
  border: 1px solid #eee;
  border-radius: 10px;
}
.info {
  height: 50%;
  display: flex;
  position: relative;
}
.info > p {
  margin-left: 20px;
  margin-top: 20px;
}
.myhead {
  width: 60px;
  height: 60px;
}
.myhead > img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}
.mycon {
  width: 30%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
}
.icon {
  display: flex;
  align-items: center;
  font-size: 25px;
  color: orange;
}
.abc {
  width: 60px;
  height: 25px;
  background-color: orange;
  border-radius: 5px 0 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  position: absolute;
  right: 0;
  top: 20%;
}
.inmsg {
  width: 100%;
  height: 43%;
  background-color: #fff;
  display: flex;
  padding-top: 10px;
}
.inmsg > div {
  width: 33%;
}
.inmsg > div > p {
  text-align: center;
  border-right: 1px solid #eee;
}
.num {
  color: orange;
  font-size: 25px;
}
.stu {
  color: #999;
  font-size: 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.mid {
  width: 90%;
  height: 40px;
  background-color: orange;
  border-radius: 50px;
  display: flex;
  margin: 10px auto;
}
.one {
  font-size: 30px;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-left: 10px;
}
.two {
  width: 80%;
  height: 40px;
  padding-left: 10px;
  font-size: 10px;
}
.two > p {
  height: 50%;
  display: flex;
  align-items: center;
  color: #fff;
}
.three {
  font-size: 22px;
  color: #fff;
  display: flex;
  padding-right: 5px;
  align-items: center;
}
ul {
  width: 90%;
  margin: 0 auto;
  margin-top: 20px;
  background-color: #ffffff;
}
ul li {
  height: 100px;
  border-bottom: 1px solid #eee;
}
ul > li > div {
  display: flex;
}
ul > li > p {
  margin-left: 10px;
  font-size: 16px;
}
ul > li > div > div {
  width: 80px;
  height: 80px;
  margin-left: 10px;
}
ul > li > div > div > img {
  width: 20px;
  height: 20px;
  padding-left: 30px;
  padding-top: 15px;
}
ul > li > div > div > p {
  color: #999;
  font-size: 14px;
  display: flex;
  justify-content: center;
  padding-top: 5px;
}
</style>